/**
 * 
 */
package com.longrise.android.loaddata;

import android.util.Log;

/**
 * simple introduction
 *
 * <p>detailed comment
 * @author xkj 2015-12-24
 * @see
 * @since 1.0
 */
public class PrintLog
{
    /** 日志输出级别NONE */
    public static final int LEVEL_NONE = 0;
    /** 日志输出级别V */
    public static final int LEVEL_VERBOSE = 1;
    /** 日志输出级别D */
    public static final int LEVEL_DEBUG = 2;
    /** 日志输出级别I */
    public static final int LEVEL_INFO = 3;
    /** 日志输出级别W */
    public static final int LEVEL_WARN = 4;
    /** 日志输出级别E */
    public static final int LEVEL_ERROR = 5;
   
    
    /** 是否允许输出log */
    private static int mDebuggable = LEVEL_NONE;
   
    /** 以级别为 v 的形式输出LOG */
    public static void v(String TAG , String msg) {
        if (mDebuggable >= LEVEL_VERBOSE) {
            Log.v(TAG, msg);
        }
    }
    /** 以级别为 d 的形式输出LOG */
    public static void d(String TAG,String msg) {
        if (mDebuggable >= LEVEL_DEBUG) {
            Log.d(TAG, msg);
        }
    }
    /** 以级别为 i 的形式输出LOG */
    public static void i(String TAG ,String msg) {
        if (mDebuggable >= LEVEL_INFO) {
            Log.i(TAG, msg);
        }
    }
    /** 以级别为 w 的形式输出LOG */
    public static void w(String TAG ,String msg) {
        if (mDebuggable >= LEVEL_WARN) {
            Log.w(TAG, msg);
        }
    }
  
    /** 以级别为 e 的形式输出LOG */
    public static void e(String TAG , String msg) {
        if (mDebuggable >= LEVEL_ERROR) {
            Log.e(TAG, msg);
        }
    }
}
